<?php

namespace App\Jobs;

use App\Notifications\Wechat\CourseStart;

class CourseStartJob extends Job
{
    protected $userId;
    protected $courseLevel;
    protected $datetime;
    protected $seriesName;

    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct($userId, $courseLevel, $datetime, $seriesName)
    {
        $this->userId = $userId;
        $this->courseLevel = $courseLevel;
        $this->datetime = $datetime;
        $this->seriesName = $seriesName;
    }

    public function handle()
    {
        // 微信消息push
        $courseStart = new CourseStart();
        $courseStart->notify(
            $this->userId,
            $this->courseLevel,
            $this->datetime,
            $this->seriesName
        );
    }

}
